public class Method {
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        swap(a, b);
        System.out.println("main: a = " + a + " b = " + b);
    }
    public static void swap(int x, int y) {
        int tmp = x;
        x = y;
        y = tmp;
        System.out.println("swap: x = " + x + " y = " + y);
    }

    /*public static int add(int x,int y){
        System.out.println("调用中的: " + "x=" + x + "," + "y=" + y);
        return x+y;
    }
    public static void main(String[] args) {
        int a = 10;
        int b = 20;
        System.out.println("调用方法之前：" + "a=" + a + "," + "b=" + b);
       // add(1,3);
        int ret = add(a,b);
        //System.out.println("调用方法之后 ：" + "ret=" + ret);
        System.out.println("调用方法之后：" + "ret=" + ret);

    }*/
}
